<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.3.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.json"};
  </script>

  <meta name="description" content="​         原文链接：https:&#x2F;&#x2F;www.cnblogs.com&#x2F;lulipro&#x2F;p&#x2F;6090407.html ​        一开始写Arduino 的时候很不习惯，没有main函数，因为好多东西都被隐藏了。一直想搞清楚，以便编写自己的库文件。于是研究了一下，下面是一些总结。 一、目录规范​        当创建一个空的工程，先按下ctrl+s保存一下。这个时候弹出对话框，命名工程">
<meta property="og:type" content="article">
<meta property="og:title" content="编写自己的Arduino库">
<meta property="og:url" content="http://example.com/2023/09/02/%E7%BC%96%E5%86%99%E8%87%AA%E5%B7%B1%E7%9A%84Arduino%E5%BA%93/index.html">
<meta property="og:site_name" content="学无止境">
<meta property="og:description" content="​         原文链接：https:&#x2F;&#x2F;www.cnblogs.com&#x2F;lulipro&#x2F;p&#x2F;6090407.html ​        一开始写Arduino 的时候很不习惯，没有main函数，因为好多东西都被隐藏了。一直想搞清楚，以便编写自己的库文件。于是研究了一下，下面是一些总结。 一、目录规范​        当创建一个空的工程，先按下ctrl+s保存一下。这个时候弹出对话框，命名工程">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309021710154.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309021723553.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309021724066.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309021731215.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022240332.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022241041.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022241113.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022245233.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022248697.png">
<meta property="og:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022253994.png">
<meta property="article:published_time" content="2023-09-02T08:59:31.000Z">
<meta property="article:modified_time" content="2023-09-02T08:59:31.000Z">
<meta property="article:author" content="xudonglei">
<meta property="article:tag" content="Arduino">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309021710154.png">

<link rel="canonical" href="http://example.com/2023/09/02/%E7%BC%96%E5%86%99%E8%87%AA%E5%B7%B1%E7%9A%84Arduino%E5%BA%93/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>编写自己的Arduino库 | 学无止境</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">学无止境</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">Do not bb, show me the example</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2023/09/02/%E7%BC%96%E5%86%99%E8%87%AA%E5%B7%B1%E7%9A%84Arduino%E5%BA%93/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="xudonglei">
      <meta itemprop="description" content="搬砖 嵌入式">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="学无止境">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          编写自己的Arduino库
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2023-09-02 16:59:31" itemprop="dateCreated datePublished" datetime="2023-09-02T16:59:31+08:00">2023-09-02</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%B5%8C%E5%85%A5%E5%BC%8F/" itemprop="url" rel="index"><span itemprop="name">嵌入式</span></a>
                </span>
            </span>

          
            <span id="/2023/09/02/%E7%BC%96%E5%86%99%E8%87%AA%E5%B7%B1%E7%9A%84Arduino%E5%BA%93/" class="post-meta-item leancloud_visitors" data-flag-title="编写自己的Arduino库" title="阅读次数">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span class="leancloud-visitors-count"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2023/09/02/%E7%BC%96%E5%86%99%E8%87%AA%E5%B7%B1%E7%9A%84Arduino%E5%BA%93/#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2023/09/02/%E7%BC%96%E5%86%99%E8%87%AA%E5%B7%B1%E7%9A%84Arduino%E5%BA%93/" itemprop="commentCount"></span>
    </a>
  </span>
  
  

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>​         原文链接：<a target="_blank" rel="noopener" href="https://www.cnblogs.com/lulipro/p/6090407.html">https://www.cnblogs.com/lulipro/p/6090407.html</a></p>
<p>​        一开始写Arduino 的时候很不习惯，没有main函数，因为好多东西都被隐藏了。一直想搞清楚，以便编写自己的库文件。于是研究了一下，下面是一些总结。</p>
<h3 id="一、目录规范"><a href="#一、目录规范" class="headerlink" title="一、目录规范"></a>一、目录规范</h3><p>​        当创建一个空的工程，先按下ctrl+s保存一下。这个时候弹出对话框，命名工程。假如命名为UART，并保存在自己的Arduino工作目录下 。</p>
<p>​        于是IDE会自动帮我们在workspace下创建1个文件夹，并将sketch主文件放在里面，而且主文件和文件夹同名。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309021710154.png" style="zoom:67%;">

<h3 id="二、主文件代码框架规范"><a href="#二、主文件代码框架规范" class="headerlink" title="二、主文件代码框架规范"></a><strong>二、主文件代码框架规范</strong></h3><p>​        每一个Arduino程序（Sketch）都有1个主文件，后缀为 <strong>.ino</strong> ，它是程序的setup 函数和 loop函数所在的文件。</p>
<p>​        有C/C++开发经验的人看到这个程序框架会愣住：我的main函数去哪里呢？</p>
<p>​        Arduino  为了让更多的人能够使用Arduino平台开发出好玩的东西出来，绞尽脑汁降低门槛，它隐藏了程序的细节，使得开发者将注意力放在实现上。</p>
<p>​        在Arduino IDE的安装目录下可以找到main.cpp这个代码模板文件，main函数就位于此。文件位置：{Arduino安装目录}\hardware\arduino\avr\cores\arduino\main.cpp。</p>
<h3 id="三、项目中使用多文件之无后缀的文件"><a href="#三、项目中使用多文件之无后缀的文件" class="headerlink" title="三、项目中使用多文件之无后缀的文件"></a>三、项目中使用多文件之无后缀的文件</h3><p>​        有时会程序越写越大，越大越乱。多文件管理可以解决这个麻烦。Arduino程序可以有多个源代码文件，但只有 1个 主文件，也就是存放 setup、loop函数的.ino文件。为了使得代码更清晰，我们让主文件用来控制程序的主要逻辑部分，而把具体的细节封装成单个模块，存放在其他的文件中，这样方便管理。</p>
<p>​        使用无后缀的文件（其实是以.ino为后缀的，只是在IDE中不会显示后缀，而在电脑的资源管理器中会显示.ino  ， 以下都称为无后缀）</p>
<p>​        点击下图中标记的按钮，选择第一个选项 【新建标签】，输入文件名即可。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309021723553.png" style="zoom:80%;">

<p>​        这样我们的工程就有了2个文件了。如下，一个主文件和一个名为LED的文件。这就是最简单的多文件方法。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309021724066.png" style="zoom:67%;">

<p>​        我不推荐使用这种方法，这是为没有C/C++编程经验的小白准备的，他们不懂函数定义 后还要声明才能使用，不懂得头文件的包含。这些都被Arduino IDE帮他们做了。IDE的具体处理是</p>
<p>​        在编译前期，Arduino IDE会将无后缀的文件 和 主文件合并成为1个文件，效果就像是写在主文件中一样。并在主文件第一行添加  #include “Arduino.h” 。 Arduino.h是 Arduino程序的核心头文件。然后，IDE将扫描合并后文件的函数定义，并对已经定义的函数添加函数的声明。（这个就是为什么即便我们定义的函数不声明也能编译通过的原因了）。但是官方明确说了，这个自动插入函数声明的机制是不完美的！所以我也建议大家养成手动声明函数的习惯。</p>
<h3 id="四、使用传统的-C-C-分离式文件"><a href="#四、使用传统的-C-C-分离式文件" class="headerlink" title="四、使用传统的 C/C++分离式文件"></a>四、<strong>使用传统的 C/C++分离式文件</strong></h3><p>​        这种方式下，对于一个代码模块，我们需要一对文件：源文件和头文件，即： .c  和.h   或者 .cpp 和 .h  。前者是C语言风格，后者是对会使用C++来说的。官方貌似推崇我们使用C++编写Arduino代码，无论是Arduino 的从标准库，还是教程中，都透露出一股强烈的OOP气息。所以我下面使用C++风格来举例子。</p>
<p>​        例如我们想要将UART的打印封装成一个模块。一开始我们需要创建2个文件 ：UART.h   、 UART.cpp</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309021731215.png" style="zoom:60%;">

<p>​        然后是想清楚我们需要让提供UART控制的哪些操作。发挥你的想象力时候到了。规定操作后，我们先写出头文件，然后写出实现，最后在主文件中使用这个模块。在主文件中使用#include”LED.h”预处理指令包含。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022240332.png" style="zoom:80%;">

<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022241041.png" style="zoom:80%;">

<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022241113.png" style="zoom:80%;">

<p>​        代码编写好后，点击上传按钮。在下载的时候，需要我们按下esp32板子上的boot按键就下载成功了。</p>
<h3 id="五、让它成为自己的库"><a href="#五、让它成为自己的库" class="headerlink" title="五、让它成为自己的库"></a>五、让它成为自己的库</h3><p>​        如果上面的模块你觉得好用，符合自己的使用习惯，而且经常要用到，那么你可以将它变成你自己的库文件。这样以后就可以直接拿来用啦。Arduino的扩展库都是放在 libraries目录下的。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022245233.png" style="zoom:80%;">

<p>​        所以我们需要在这个目录下创建一个文件夹，比如上面的例子是UART控制，于是我创建了 m_UART文件夹（前面加m是为了和官方库区分开，这只是个人的习惯而已）。然后把写好的.cpp 和 .h文件拷贝到里面去，这样就OK了。</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022248697.png" style="zoom:80%;">

<p>​        这样我们的主文件就变成了下面这样，很简洁干净：</p>
<img src="https://xdl-blog-picture.oss-cn-shanghai.aliyuncs.com/img/202309022253994.png" style="zoom:80%;">
    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Arduino/" rel="tag"># Arduino</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2023/06/23/PyQt5%E5%B5%8C%E5%85%A5matplotlib%E7%BB%98%E5%9B%BE/" rel="prev" title="PyQt5嵌入matplotlib绘图">
      <i class="fa fa-chevron-left"></i> PyQt5嵌入matplotlib绘图
    </a></div>
      <div class="post-nav-item">
    <a href="/2023/09/03/esp32%20arduino%20PWM%E5%AD%A6%E4%B9%A0/" rel="next" title="esp32 arduino PWM学习">
      esp32 arduino PWM学习 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%80%E3%80%81%E7%9B%AE%E5%BD%95%E8%A7%84%E8%8C%83"><span class="nav-number">1.</span> <span class="nav-text">一、目录规范</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E4%B8%BB%E6%96%87%E4%BB%B6%E4%BB%A3%E7%A0%81%E6%A1%86%E6%9E%B6%E8%A7%84%E8%8C%83"><span class="nav-number">2.</span> <span class="nav-text">二、主文件代码框架规范</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E9%A1%B9%E7%9B%AE%E4%B8%AD%E4%BD%BF%E7%94%A8%E5%A4%9A%E6%96%87%E4%BB%B6%E4%B9%8B%E6%97%A0%E5%90%8E%E7%BC%80%E7%9A%84%E6%96%87%E4%BB%B6"><span class="nav-number">3.</span> <span class="nav-text">三、项目中使用多文件之无后缀的文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E4%BD%BF%E7%94%A8%E4%BC%A0%E7%BB%9F%E7%9A%84-C-C-%E5%88%86%E7%A6%BB%E5%BC%8F%E6%96%87%E4%BB%B6"><span class="nav-number">4.</span> <span class="nav-text">四、使用传统的 C&#x2F;C++分离式文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BA%94%E3%80%81%E8%AE%A9%E5%AE%83%E6%88%90%E4%B8%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%BA%93"><span class="nav-number">5.</span> <span class="nav-text">五、让它成为自己的库</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">xudonglei</p>
  <div class="site-description" itemprop="description">搬砖 嵌入式</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">283</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">19</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">67</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">xudonglei</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://muse.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : false,
      notify     : false,
      appId      : 'BT0Qw9HcTpPv1a6cT1iDBXKz-gzGzoHsz',
      appKey     : 'LMCMh8v02JTMFAwKNRcgoizI',
      placeholder: "Just go go",
      avatar     : 'mm',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : true,
      lang       : 'zh-CN' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
